This helps make things less confusing when we try to create a file not
owned by our uid, such as running ostree-pull as non-root on a
repository owned by root.
if (lchown (dest_path, uid, gid) < 0)
{
ot_util_set_error_from_errno (error, errno);
+ g_prefix_error (error, "lchown(%u, %u) failed: ", uid, gid);
goto out;
}
}
if (chmod (dest_path, mode) < 0)
{
ot_util_set_error_from_errno (error, errno);
+ g_prefix_error (error, "chmod(%u) failed: ", mode);
goto out;
}
}